package com.example.demo.mybatis.domain;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import lombok.Data;

import java.io.Serializable;

/**
 * 引入依赖：
 * <dependency>
 *     <groupId>com.fasterxml.jackson.dataformat</groupId>
 *     <artifactId>jackson-dataformat-xml</artifactId>
 * </dependency>
 * 注释：
 * @JacksonXmlRootElement、@JacksonXmlProperty注解是用来维护对象属性在xml中的对应关系。
 *
 */
@Data
@JacksonXmlRootElement(localName = "cust")  //定义对象与Xml的关系
public class TCust implements Serializable {
    @JacksonXmlProperty(localName = "id")
    private Long id;
    @JacksonXmlProperty(localName = "name")
    private String name;
    @JacksonXmlProperty(localName = "age")
    private Integer age;
    @JacksonXmlProperty(localName = "email")
    private String email;
//    @TableLogic //逻辑删除标识
    private Integer deleted;
}